﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hetymine.Executioner.Plugins.Triggers.DateTime {
    public static class Extensions {
        public static bool ContainsToday(this Days days, DayOfWeek day) {
            switch (day) {
                case DayOfWeek.Monday:
                    return ((days | Days.Monday) == days);
                case DayOfWeek.Tuesday:
                    return ((days | Days.Tuesday) == days);
                case DayOfWeek.Wednesday:
                    return ((days | Days.Wednesday) == days);
                case DayOfWeek.Thursday:
                    return ((days | Days.Thursday) == days);
                case DayOfWeek.Friday:
                    return ((days | Days.Friday) == days);
                case DayOfWeek.Saturday:
                    return ((days | Days.Saturday) == days);
                case DayOfWeek.Sunday:
                    return ((days | Days.Sunday) == days);
            }

            return false;
        }
    }
}
